import './App.css'
import Login from './pages/login/index.jsx'
import Layout from './pages/layout/index.jsx'
import { Route, Switch, Redirect } from 'react-router-dom'

function App() {
  return (
    <div className="App">
      <Switch>
        <Route
          exact
          path="/"
          render={() => {
            return <Redirect to="/home"></Redirect>
          }}
        >
          <Layout />
        </Route>
        <Route path="/home" component={Layout}></Route>
        <Route path="/login" component={Login}></Route>
      </Switch>
    </div>
  )
}

export default App
